import request from '@/utils/request'
export default {
  list(orm, where, page = 1, orders = {}) {
    const url = 'admin/orm/index'
    return request.post(url, { 'ORM': orm, where, page, orders })
  },
  detail(orm, id) {
    const url = 'admin/orm/detail'
    return request.post(url, { 'ORM': orm, id })
  },
  create(orm, data) {
    const url = 'admin/orm/create'
    return request.post(url, { 'ORM': orm, data })
  },
  import(orm, data) {
    const url = 'admin/orm/import'
    return request.post(url, { 'ORM': orm, data })
  },
  update(orm, id, data) {
    const url = 'admin/orm/update'
    return request.post(url, { 'ORM': orm, id, data })
  },
  delete(orm, id) {
    const url = 'admin/orm/delete'
    return request.post(url, { 'ORM': orm, id })
  }
}
